<?php
('Access-Control-Allow-Origin：*');
include("../config/mysql.php");
$db = new mysql();
$students = $_POST["students"];

for ($i = 0; $i < count($students); $i++) {
    $sql = "INSERT INTO students (cengci,tid,name,phone,cardid,school,major,money,ispay,isBao,creattime,educationType,remarks,signUpTime,signUpYear,veteran,company_id) VALUES ('{$students[$i]["cengci"]}','{$students[$i]["tid"]}','{$students[$i]["name"]}','{$students[$i]["phone"]}','{$students[$i]["cardid"]}','{$students[$i]["school"]}','{$students[$i]["major"]}','{$students[$i]["money"]}','{$students[$i]["ispay"]}','{$students[$i]["isBao"]}','{$students[$i]["creattime"]}','{$students[$i]["educationType"]}','{$students[$i]["remarks"]}','{$students[$i]["signUpTime"]}','{$students[$i]["signUpYear"]}','{$students[$i]["veteran"]}',{$students[$i]["company_id"]})";
    $db->Query($sql);
}
echo $i;

$db->close();
